package cn.jinjie.day09;

import java.util.ArrayList;
import java.util.Collections;
import java.util.stream.Stream;

public class Test07 {
    public static void main(String[] args) {
        ArrayList<String> al = new ArrayList<String>();
        Collections.addAll(al,"周润发", "成龙", "小明", "刘德华", "吴京", "周星驰", "李连杰");
        System.out.println(al.stream().limit(5).skip(2).count());
        System.out.println("=====");
        ArrayList<String> al1 = new ArrayList<String>();
        Collections.addAll(al1, "林心如", "张曼玉", "林青霞", "柳岩", "林志玲", "小明", "王祖贤");
        Stream.concat(al.stream(),al1.stream()).distinct().forEach(System.out::println);
    }
}
